package com.futao.springbootlearn20220224.condition;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Conditional;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @author futao@gmail.com
 * @date 2022/3/9
 */
@Slf4j
@Component
@Conditional(DefaultCondition.class)
public class ConditionConfig {

    @PostConstruct
    public void init() {
        log.info("只有当前激活了default profile才会实例化这个bean");
    }
}
